package com.guan.poi.tmp;

import com.guan.poi.core.PoiStyle;
import lombok.Getter;

/**
 * 一个单元格
 */
@Getter
public class CelRegion implements Comparable<CelRegion> {
    private final int row;
    private final int cel;
    private PoiStyle style;

    public CelRegion(int row, int cel) {
        this.row = row;
        this.cel = cel;
    }

    public CelRegion(int row, int cel, PoiStyle style) {
        this.row = row;
        this.cel = cel;
        this.style = style;
    }

    @Override
    public int compareTo(CelRegion o) {
        int i = this.row - o.row;
        if(i==0) {
            return this.cel - o.cel;
        }
        return i;
    }
}
